package com.baseLesson._03_io;

import java.io.*;

public class _06_BufferReader {

    public static void main(String[] args) throws IOException {
        reader();

    }

    private static void reader() throws IOException {
        String str = null;
        FileReader fileReader = new FileReader("data/test/first.txt");
        BufferedReader br = new BufferedReader(fileReader);

        while ((str = br.readLine()) != null) {
            System.out.println(str);//此时str就保存了一行字符串
        }
    }


}
